#ifndef OPENGL_WIDGET_TEXTURE_MOUSE_KEY_H_
#define OPENGL_WIDGET_TEXTURE_MOUSE_KEY_H_

#include <QOpenGLWidget>
#include <QOpenGLFunctions_3_3_Core>
// 使用Qt控件控制GL绘制，在paintGL 函数外部调用OpenGL函数

class OpenGLWidgetTextureMouseKey:public QOpenGLWidget, QOpenGLFunctions_3_3_Core
{
	Q_OBJECT
public:
	OpenGLWidgetTextureMouseKey(QWidget* parent);
	void TestMaxGLBufferData();
	~OpenGLWidgetTextureMouseKey() ;
	QString description = "使用鼠标和键盘控制图形变换。鼠标键盘控制视角，鼠标滚轮：前进，后退，键盘上、下、左、右键：平移，鼠标拖动：旋转";


	//void drawShape(Shape shape);

	void setWireFrame(bool wireFrame);

protected:
	virtual void initializeGL();
	virtual void resizeGL(int w, int h);
	virtual void paintGL();

	virtual void mousePressEvent(QMouseEvent *event);
	virtual void mouseReleaseEvent(QMouseEvent *event);
	virtual void mouseMoveEvent(QMouseEvent *event);
	virtual void keyPressEvent(QKeyEvent *event) override;
	virtual void wheelEvent(QWheelEvent *event);


private:
	//Shape _shape;

};

#endif